import Cookies from 'js-cookie';
import Keys from '@/constant/key';

export const getSidebarStatus = ():string => Cookies.get(Keys.sidebarStatusKey) as string;
export const setSidebarStatus = (sidebarStatus: string):void => {
  Cookies.set(Keys.sidebarStatusKey, sidebarStatus);
};

export const getToken = ():string => Cookies.get(Keys.tokenKey) as string;
export const setToken = (token: string): void => {
  Cookies.set(Keys.tokenKey, token);
};
export const removeToken = (): void => Cookies.remove(Keys.tokenKey);

export const getUserName = (): string => Cookies.get(Keys.userNameKey) as string;
export const setUserName = (userName: string): void => {
  Cookies.set(Keys.userNameKey, userName);
};
export const removeUserName = (): void => Cookies.remove(Keys.userNameKey);
